-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address issues in auto-generated CDDL specification #4553
Conversation
Note that this is now out-of-date with #4552 - I'll update after that one is merged. |
abfbd8d
to
54feb14
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nc6 Please fix the formatting and I'll do the proper then.
Sorry, I just can't look at the trailing commas they hurting my eyes.
In addition to documentation comments, is it possible to regroup definitions please. For example, currently the conway certificates definitions are all over the place. It seems they are sorted alphabetically, which isn’t useful. |
ee8d2c4
to
e3d5da6
Compare
Rebased on master, to remove the master-merge commit |
Now that the CDDL is defined with Cuddle, we can begin to properly modularise it. As a first step, we move the common crypto and utility types into the core package.
- Switch existing tests to using the generated CDDL - Add additional Huddle based tests for Shelley types - Add a tool to regenerate the Shelley CDDL from Huddle - Move additional core types to the core CDDL - Make a few fixes in the Shelley Huddle spec There is one unusual thing here: the size bound on the max block header size in the protocol param update. This does not reflect the original CDDL, but it is consistent with the FromCBOR instance and the underlying data type in PParams. I can only assume that the CDDL generator wasn't exploring the whole range and thus never found this error.
Now that Shelley is defined using Huddle, we can rely on the relevant parts from Conway.
We use 'here' QuasiQuotes to make handling multiline comments somewhat less painful.
This addresses issue #4535. The first rule in a CDDL file is taken to be the root element.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CDDL is looking better and better 😀
Description
This addresses issue #4462
One unexpected change: the huddle definition for protocol_param_updates has a size limit on the max block header size. This is consistent with the Haskell serialisers and data structure.
In addition, we add a couple of extra commits solving two issues:
Note that this PR now incorporates the contents of #4552
Checklist
CHANGELOG.md
for the affected packages.New section is never added with the code changes. (See RELEASING.md)
.cabal
andCHANGELOG.md
files according to theversioning process.
.cabal
files for all affected packages are updated.If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
fourmolu
(usescripts/fourmolize.sh
)scripts/cabal-format.sh
)hie.yaml
has been updated (usescripts/gen-hie.sh
)